<div class="business-toolbar clearfix">
	<div class="sub-title">{{model.name}}</div>
	<div class="pl20">
		<div class="pr-part pull-left">
			{{view view.daterangepicker
				id="dateRangePicker"
				defaultDate=pinTimePoint
				clickTimePoint="timePointChange"
				startDate = startDate
				endDate = endDate
				position="right"
				timeRanges="timeRangesChange"
				class=""
			}}
		</div>
		<div class="input-append pr-part pull-left">
			{{input class="input span3" id="mouseKeyUp" value=keyWord placeholder="关键字"}}
		</div>
	</div>
</div>

<div class="apm-gridcontainer">
	{{view view.Grid
		columns=perfColumns
		content=errorcodes
		allowPaging=true
		pageIndex=pageIndex
		pageSize=pageSize
		totalRows=totalRows
		allowSorting=true
		cellClicked="errorGridClicked"
		pageIndexChanged="pageIndexChanged"
		class="business-grid-white-space"}}
</div>

{{#view view.Dialog
	id="businessNodeDetailErrorcodeStackDialog"
	class="node-error-stack"
	title="错误明细"
	autoOpen=false
	modal=true
	width=650
	height=560
	dialogClose=dialogClose
	buttons=dialogButtons}}
	<div class="control-group error-uri">
		{{curError.uri}}
	</div>
	<div class="control-group error-info">
		<table class="apm-table">
			<tr>
				<td>
					<div class="title">第一次发生时间</div>
					<div>{{curError._formatted_firstTime}}</div>
				</td>
				<td>
					<div class="title">最后一次出现时间</div>
					<div>{{curError._formatted_lastTime}}</div>
				</td>
				<td>
					<div class="title">发生次数</div>
					<div>{{curError.repeatCount}}</div>
				</td>
			</tr>
		</table>
	</div>
	<div class="control-group">
		<div class="stack-index">
			<span class="title">最近{{curErrorStack._index}}次</span>
			<span class="content">
				<i class="glyphicon glyphicon-step-backward" {{action "gotoErrorStack" "first"}}></i>
				<i class="glyphicon glyphicon-chevron-left" {{action "gotoErrorStack" "-1"}}></i>
				发生时间：{{curErrorStack._formattedTime}}
				<i class="glyphicon glyphicon-chevron-right" {{action "gotoErrorStack" "+1"}}></i>
				<i class="glyphicon glyphicon-step-forward" {{action "gotoErrorStack" "last"}}></i>
			</span>
		</div>
		<div class="stack-errormsg">
			<table class="apm-table">
				<tr>
					<td style="width:30%">错误信息</td>
					<td>{{curErrorStack.errorMessage}}</td>
				</tr>
				<tr>
					<td colspan="2">原始信息</td>
				</tr>
				{{#each curErrorStack.fields as |field|}}
				<tr>
					<td class="name" style="width:30%">{{field.name}}</td>
					<td class="value">{{field.value}}</td>
				</tr>
				{{/each}}
			</table>
		</div>
	</div>
{{/view}}